<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>商品管理-商品列表</title>
		<jsp:include page="../../include/base.jsp"></jsp:include>
		<jsp:include page="../../include/common.jsp"></jsp:include>
		<jsp:include page="../../include/baseManage.jsp"></jsp:include>
	</head>
	<body>
		<div class="mini-toolbar"
			style="border: 0; font-size: 12px; padding-left: 6px;">
			<!-- 操作面板 -->
			<div class="operatePanel">
				<input id="goods_list_add" class="mini-button" text="添加商品"
					iconCls="icon-addnew" plain="false" visible="false"  
					onclick="GoodsHandler.addGoods"/>
				<input id="goods_list_edit" class="mini-button" text="编辑商品"
					iconCls="icon-edit" plain="false" visible="false"
					onclick="GoodsHandler.editGoods"/>
				<input id="goods_list_picture" class="mini-button" text="商品相册"
					iconCls="icon-btn-picture" plain="false" visible="false"
					onclick="GoodsHandler.addGoodsPicture"/>
				<input id="goods_list_discount" class="mini-button" text="商品优惠"
					iconCls="icon-btn-youhui" plain="false" visible="false" 
					onclick="GoodsHandler.goodsDiscount"/>
				<input id="goods_list_promotion" class="mini-button" text="商品促销"
					iconCls="icon-btn-cuxiao" plain="false" visible="false" 
					onclick="GoodsHandler.goodsPromotion"/>
				<input id="goods_list_accessories" class="mini-button" text="商品配件"
					iconCls="icon-btn-peijian" plain="false" visible="false" 
					onclick="GoodsHandler.accessories"/>
				<input id="goods_list_relation" class="mini-button" text="商品关联"
					iconCls="icon-btn-gguanlian" plain="false" visible="false" 
					onclick="GoodsHandler.association"/>
				<input id="goods_list_article" class="mini-button" text="文章关联"
					iconCls="icon-btn-guanlian" plain="false" visible="false" 
					onclick="GoodsHandler.article"/>
				<input id="goods_list_query" class="mini-button" text="展开查询"
					iconCls="icon-btn-expand" plain="false" visible="false" 
					onclick="GoodsHandler.queryGoods"/>
				<input id="goods_list_refresh" class="mini-button" text="刷新"
					iconCls="icon-btn-refresh" plain="false" visible="false" 
					onclick="GoodsHandler.afresh"/>
			</div>
			<!-- 查询面板 -->
			<div id="queryGoodsDiv" class="queryPanel">
				<form id="goodsQueryForm">
					<input id="queryBggTree" name="queryBggTree"
						class="mini-treeselect" popupWidth="160" valueField="bggId"
						parentField="bggParent" textField="bggName" width="130"
						url="<%=path%>/getBggTreeSelect.do?type=query" value="-1" />
					<input class="mini-combobox" id="queryBgiBrand"
						name="queryBgiBrand" textField="bgbName" valueField="bgbId"
						width="130" />
					<input class="mini-combobox" id="queryBgiSupplier"
						name="queryBgiSupplier" textField="bsiName" valueField="bsiId"
						width="130" />
					<input class="mini-combobox" id="queryGoodsCommend"
						name="queryGoodsCommend" textField="text" valueField="id"
						width="80" />
					<label class="queryPanelLbl">
						排序列：
					</label>
					<input class="mini-combobox" id="goodsSortingCol"
						name="goodsSortingCol" textField="text" valueField="id" width="80" />
					<input class="mini-combobox" id="goodsSortingDir"
						name="goodsSortingDir" textField="text" valueField="id" width="80" />
					<label class="queryPanelLbl">
						关键字：
					</label>
					<input class="mini-textbox" id="queryGoodsKeyword"
						name="queryGoodsKeyword" width="80" />
					<input class="mini-button" text="查询" iconCls="icon-btn-search"
						plain="false" onclick="GoodsHandler.doQueryGoods" />
				</form>
			</div>
		</div>
		<div class="mini-fit" id="goodsPanel">
			<div id="goodsGrid" class="mini-datagrid" fitColumns="true"
				style="width: 100%; height: 100%;" multiSelect="true" pageSize="20"
				borderStyle="border-bottom:0;border-left:0;border-right:0;"
				virtualScroll="true" idField="bgiId" url="<%=path%>/getGoodsList.do">
				<div property="columns">
					<div type="checkcolumn"></div>
					<div type="indexcolumn" width="40" headerAlign="center">
						序号
					</div>
					<div field="bgiName" name="bgiName" width="100%"
						headerAlign="center" allowSort="true">
						商品名称
					</div>
					<div field="bgiGsn" name="bgiGsn" width="100" headerAlign="center"
						align="center" allowSort="true">
						商品货号
					</div>
					<div field="bgiPrice" name="bgiPrice" width="70"
						headerAlign="center" align="center" allowSort="true">
						商品价格
					</div>
					<div field="bgiBest" name="bgiBest" width="70" headerAlign="center"
						align="center" allowSort="true">
						精品
					</div>
					<div field="bgiNew" name="bgiNew" width="70" headerAlign="center"
						align="center" allowSort="true">
						新品
					</div>
					<div field="bgiHot" name="bgiHot" width="70" headerAlign="center"
						align="center" allowSort="true">
						热销
					</div>
					<div field="bgiBuy" name="bgiBuy" width="70" headerAlign="center"
						align="center" allowSort="true">
						团购推荐
					</div>
					<div field="bgiOrder" name="bgiOrder" width="70"
						headerAlign="center" align="center" allowSort="true">
						推荐排序
					</div>
					<div field="bgiWarn" name="bgiWarn" width="70" headerAlign="center"
						align="center" allowSort="true">
						警告数量
					</div>
					<div field="bgiNumber" name="bgiNumber" width="70"
						headerAlign="center" align="center" allowSort="true">
						库存总数
					</div>
					<div field="bgiOperation" name="bgiOperation" width="120"
						headerAlign="center" align="center">
						操作
					</div>
				</div>
			</div>
		</div>
	</body>
	<script src="handler/GoodsQueryHandler.js" type="text/javascript"></script>
	<script src="handler/GoodsListHandler.js" type="text/javascript"></script>
</html>
